<?php
#+------------------------------------------------------------------
#| 普通的。
#+------------------------------------------------------------------
#| Author:Janmas Cromwell <janmas-cromwell@outlook.com>
#+------------------------------------------------------------------

$nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4];
$max = 0;
$n = sizeof($nums);
$tmp =0;
$max = $nums[0];
for($i=0;$i<$n;$i++){
    $tmp += $nums[$i];
    if($tmp<$nums[$i]) $tmp = $nums[$i];
    if($max<$tmp ) $max=$tmp;
}

var_dump($max);

exit;
include '../vendor/autoload.php';

$timeLine = new \form\TimeLine();
$data = [
    ['text' => 1, 'description' => 'asdasdasd', 'time' => '2021-09-25'],
    ['text' => 1, 'description' => 'asdasdasd', 'time' => '2021-09-25'],
    ['text' => 1, 'description' => 'asdasdasd', 'time' => '2021-09-25'],
    ['text' => 1, 'description' => 'asdasdasd', 'time' => '2021-09-25'],
];
echo $timeLine->data($data)->display();

exit;

$form = new \form\Form(\form\Form::NORMAL, 'form');
$form->begin('', 'get');
//$form->field('type','select')->label('栏目')->append('a')->prepend('b')->scene('inline')->options(['小说','古籍','专辑','自传'],1)->tips('请选择一个栏目');
//$form->field('title')->placeholder('请输入标题')->prepend('标题')->label('标题')->maxLength(15);
//$form->field('color', 'color')->scene('inline')->prepend('color')->label('颜色');
//$form->field('keywords')->placeholder('请输入关键词')->label('关键词')->append('关键词');
//$form->field('description','textarea')->prepend('@')->placeholder('请输入描述')->label('描述');
//$form->field('sort','number')->placeholder('')->value(0)->label('排序');
//$form->field('status','radio')->scene(\form\Form::INLINE)->options(['禁用','启用'],1)->label('状态')->tips('默认启用状态');
//$form->field('tags', 'tag')->placeholder('快输入标签文字吼吼哈嘿');
$form->field('image', 'cropper')->url('http://example.itshubao.com/index/test/upload')->file('http://example.itshubao.com/index/images/logo.png');
//$form->field('content', 'ckeditor');
//$form->field('content1', 'editor');
//$form->field('tagss', 'tag');
//$form->buttons('确定')->class('btn-success');
#$form->registerCss($css);
#$form->registerJs($js);
file_put_contents('./a.html', $form->display());
